%% -*- erlang -*-
{cover_enabled, true}.
{cover_opts, [verbose]}.
{cover_excl_mods,
 [
  blockchain_txn_handler,
  blockchain_poc_target_v2, % obsolete

  blockchain_poc_path_v2, % obsolete
  blockchain_poc_path_v3, % obsolete

  %% cli stuff
  blockchain_console,
  blockchain_cli_ledger,
  blockchain_cli_peer,
  blockchain_cli_txn,
  blockchain_cli_sc,

  %% test stuff
  blockchain_worker_meck_original,
  blockchain_event_meck_original
 ]}.
{cover_export_enabled, true}.
{covertool, [{coverdata_files,
              [
               "ct.coverdata",
               "eunit.coverdata"
              ]}]
}.

{deps, [
    {lager, "3.9.2"},
    {erl_base58, "0.0.1"},
    {base64url, "1.0.1"},
    {jsx, "3.1.0"},
    {libp2p, ".*", {git, "https://github.com/helium/erlang-libp2p.git", {branch, "master"}}},
    {clique, ".*", {git, "https://github.com/helium/clique.git", {branch, "develop"}}},
    {h3, ".*", {git, "https://github.com/helium/erlang-h3.git", {branch, "master"}}},
    {erl_angry_purple_tiger, ".*", {git, "https://github.com/helium/erl_angry_purple_tiger.git", {branch, "master"}}},
    {erlang_stats, ".*", {git, "https://github.com/helium/erlang-stats.git", {branch, "master"}}},
    {e2qc, ".*", {git, "https://github.com/helium/e2qc", {branch, "master"}}},
    {vincenty, ".*", {git, "https://github.com/helium/vincenty", {branch, "master"}}},
    {helium_proto, {git, "https://github.com/helium/proto.git", {branch, "master"}}},
    {merkerl, ".*", {git, "https://github.com/helium/merkerl.git", {branch, "master"}}},
    {xxhash, {git, "https://github.com/pierreis/erlang-xxhash", {branch, "master"}}},
    {exor_filter, ".*", {git, "https://github.com/mpope9/exor_filter", {branch, "master"}}},
    {grpcbox, {git, "https://github.com/andymck/grpcbox.git", {branch, "andymck/ts-master/stream-handler-changes"}}},
    {recon, "2.5.2"}
]}.

{erl_opts, [
    debug_info,
    {parse_transform, lager_transform},
    {i, "./_build/default/plugins/gpb/include"},
    warnings_as_errors
]}.

{plugins,
 [
  {grpcbox_plugin, {git, "https://github.com/andymck/grpcbox_plugin.git", {branch, "andymck/ts-master/combined-opts-and-template-changes"}}},
  covertool,
  {rebar3_eqc, {git, "https://github.com/Vagabond/rebar3-eqc-plugin", {branch, "master"}}}
 ]}.

{pre_hooks, [
    {compile, "make grpc"},
    {clean, "make clean_grpc"}
]}.

{xref_checks, [
    undefined_function_calls,
    undefined_functions
    %% deprecated_function_calls,
    %% deprecated_functions
]}.

{profiles, [
    {test, [
        {relx, [
                {sys_config, "./config/test.config"},
              {overlay,
               [{copy, "config/sys.config", "config/sys.config"}]}
        ]
        },
        {deps, [{meck, "0.8.12"}, {grpc_client, {git, "https://github.com/Bluehouse-Technology/grpc_client.git", {branch, "master"}}}]}
    ]},
    {eqc, [
           {erl_opts, [{d, 'TEST'}]},
           {src_dirs, ["test", "src"]},
           %% {cover_enabled, false},
           {deps, [{meck, "0.8.12"}]}
    ]}
]}.
